<template>
  <div>
    <el-button
      @click="restoreToLocal"
    >本地文库更新</el-button>
    <el-button @click="updateAllKeywords">
      更新数据库中的关键字
    </el-button>

  </div></template>

<script>
import { putArticleToLocal } from '@/api/config'

export default {
  name: 'Config',
  methods: {
    restoreToLocal() {
      putArticleToLocal().then((res) => {
        this.$message.success('本地文库更新成功！', 'success')
      })
    },
    updateAllKeywords() {
      putArticleToLocal().then((res) => {
        this.$message.success('关键字更新成功！', 'success')
      })
    }
  }
}
</script>

<style scoped>

</style>
